package 集合框架.Map.购物车;

/**
 * 商品类
 */
public class Goods {

    /**
     * id:商品编号
     * title:商品名称
     * price:商品价格
     * stock:库存数量
     */
    private int id;
    private String title;
    private double price;
    private int stock;

    public Goods() {
    }

    public Goods(int id, String title, double price, int stock) {
        this.id = id;
        this.title = title;
        this.price = price;
        this.stock = stock;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getStock() {
        return stock;
    }

    public void setStock(int stock) {
        this.stock = stock;
    }
}
